<article class="module width_3_quarter">
    <header>
      <h3 class="tabs_involved">优惠码</h3>
     <ul class="tabs">
        <li><a href="batch_discount">批量发送</a></li>
        
      </ul>
    </header>
    <div class="tab_container">
      <div id="tab1" class="tab_content">
        <table class="tablesorter" cellspacing="0">
        
          <thead>
            <tr>
             <th>ID</th>
              <th>code</th>
              <th>价值</th>
              
              <th>状态</th>
              <th>增加时间</th>
              <th>操作</th>
            </tr>
          </thead>
          <tbody>
          <tr>
          	<td  colspan="2">新增</td>
            <td><input  type="text" size="3" name="discount_val"/></td>
            <td colspan="2"> <a  class="alt_btn" onclick="AD.addDiscount()">增加</a></td>
          </tr>
          
          {{foreach from=$discount key=key item=list}}
            <tr>
             
              <td>{{$list.discount_id}}</td>
             
              <td>{{$list.code}}</td>
           	  <td>{{$list.value}}</td>
           	  <td>{{if $list.status==1}}未使用{else}
           Email:{{$list.use_info.email}} 订单号:{{$list.use_info.order.order_sn}}
           时间:{{$list.use_info.use_date}}
              
               {{/if}}</td>
              <td>{{$list.add_time}}</td>
              <td>
            
              <a  class="alt_btn" href="admins.php?act=del_discount&discount_id={{$list.discount_id}}">删除</a>
              </td>
            </tr>
         {{/foreach}}  
          </tbody>
        </table>
      </div>
      <!-- end of #tab1 -->
      <!-- end of #tab2 --> 
      
    </div>
    <!-- end of .tab_container --> 
    
  </article>
  {{include file="../../pages.htm"}}